﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LaneLpnr.Common
{
    public static class Lyg_SendData
    {
        public struct Lyg_ParkingDataInfo
        {
            public string url { get; set; }
            public string txId { get; set; }                   
            public string parkCode { get; set; }               
            public string parkName { get; set; }               
            public string laneCode { get; set; }                
            public string laneName { get; set; }       
            public string plate { get; set; }     
            public string plateColor { get; set; }            
            public string entryTime { get; set; } //1 为入场              
            public string remarks { get; set; }    
            
            public string image1 { get; set; }
            public string exitTime { get; set; } //2为出场

        }

       

        public struct Lyg_ParkingPicfile
        {
            public string txId { get; set; }      //车场id
            public string file { get; set; }      //图片文件
         
        }


        //初始化结构体
        public static Lyg_ParkingDataInfo ParkInfo_Init(int n)
        {
            Lyg_ParkingDataInfo[] _Lyg_ParkingDataInfos = new Lyg_ParkingDataInfo[2];

            if (n == 0)
            {
                _Lyg_ParkingDataInfos[0].url = Common.ConfigHelper.GetConnectionStringConfig("lyg_posturl");
                _Lyg_ParkingDataInfos[0].parkCode = Common.ConfigHelper.GetConnectionStringConfig("parkCode");
                _Lyg_ParkingDataInfos[0].parkName = Common.ConfigHelper.GetConnectionStringConfig("parkName");
                _Lyg_ParkingDataInfos[0].laneCode = Common.ConfigHelper.GetConnectionStringConfig("ULID_1");
                _Lyg_ParkingDataInfos[0].laneName = Common.ConfigHelper.GetConnectionStringConfig("LaneName_1");
                _Lyg_ParkingDataInfos[0].remarks = "";

                return _Lyg_ParkingDataInfos[0];
            }
            if (n == 1)
            {
                _Lyg_ParkingDataInfos[1].url = Common.ConfigHelper.GetConnectionStringConfig("lyg_posturl");
                _Lyg_ParkingDataInfos[1].parkCode = Common.ConfigHelper.GetConnectionStringConfig("parkCode");
                _Lyg_ParkingDataInfos[1].parkName = Common.ConfigHelper.GetConnectionStringConfig("parkName");
                _Lyg_ParkingDataInfos[1].laneCode = Common.ConfigHelper.GetConnectionStringConfig("ULID_2");
                _Lyg_ParkingDataInfos[1].laneName = Common.ConfigHelper.GetConnectionStringConfig("LaneName_2");
                _Lyg_ParkingDataInfos[1].remarks = "";
               
                return _Lyg_ParkingDataInfos[1];
            }

            return _Lyg_ParkingDataInfos[0];
        }



      



    }
}
